import axios from "../utils/request";

export const $list = async () => {
  let { data } = await axios.get("role/list");
  return data;
};
export const $add = async (values) => {
  let { data } = await axios.post("role/add", values);
  return data;
};
export const $del = async (role) => {
  let { data } = await axios.post("role/del", role);
  return data;
};

export const $getOne = async (key) => {
  let { data } = await axios.get(`role/getOne?key=${key}`);
  return data;
};
export const $update = async (values) => {
  let { data } = await axios.post("role/update", values);
  return data;
};
